package com.yangl.corejava.annotation;

import java.lang.reflect.Method;

/**
 * Created by yangl on 2018/4/24.
 */
public class LogUtil {

    public void getAnnotationValue(Class<?> clazz){
        System.out.println(clazz.getName());
        Method[] methods = clazz.getDeclaredMethods();

        for(Method method : methods){
            System.out.println(method.getName());
            LogService logService = method.getAnnotation(LogService.class);
            if(null != logService){
                System.out.println(logService.value()+logService.descript());
            }
        }
    }
}
